<template>
  <el-card class="box-card">
    <!-- 标题 -->
    <template #header v-if="istitle">
      <div class="titleBox">
        <span class="title"><slot name="title"></slot></span>
        <slot name="titleButtom"></slot>
      </div>
    </template>

    <!-- 内容 -->
    <template>
      <slot></slot>
    </template>
  </el-card>
</template>

<script>
export default {
  props: {
    istitle: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="less" scoped>
.box-card {
  width: 100%;

  .titleBox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .title {
      font-weight: bold;
    }
  }
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}
</style>
